import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

import findbook.findbook_author;
import findbook.findbook_authorandbookname;
import findbook.findbook_bookname;
import net.miginfocom.swing.*;
/*
 * Created by JFormDesigner on Mon Dec 16 01:57:46 CST 2024
 */



/**
 * @author jjchen
 */
public class findBook_user extends JFrame {
    public findBook_user() {
        initComponents();
    }

    private void button4MouseClicked(MouseEvent e) {
        this.dispose();
        this.setVisible(false);
        user_Home user = new user_Home();
        user.setVisible(true);
    }

    private void findbook_author(MouseEvent e) {
        findbook_author author = new findbook_author();
        author.setVisible(true);
        this.dispose();
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }

    private void button2MouseClicked(MouseEvent e) {
        findbook_bookname bookname = new findbook_bookname();
        bookname.setVisible(true);
        this.dispose();
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }

    private void button3MouseClicked(MouseEvent e) {
        findbook_authorandbookname authorandbookname = new findbook_authorandbookname();
        authorandbookname.setVisible(true);
        this.dispose();
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }

    private void initComponents() {
        // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents  @formatter:off
        label1 = new JLabel();
        button1 = new JButton();
        button2 = new JButton();
        button3 = new JButton();
        button4 = new JButton();

        //======== this ========
        var contentPane = getContentPane();
        contentPane.setLayout(new MigLayout(
            "hidemode 3",
            // columns
            "[fill]" +
            "[fill]" +
            "[fill]" +
            "[fill]" +
            "[fill]" +
            "[fill]" +
            "[fill]",
            // rows
            "[]" +
            "[]" +
            "[]" +
            "[]" +
            "[]" +
            "[]" +
            "[]" +
            "[]" +
            "[]" +
            "[]" +
            "[]" +
            "[]" +
            "[]"));

        //---- label1 ----
        label1.setText("\u67e5\u8be2\u56fe\u4e66");
        label1.setFont(label1.getFont().deriveFont(label1.getFont().getStyle() | Font.BOLD, label1.getFont().getSize() + 5f));
        contentPane.add(label1, "cell 2 2 2 3");

        //---- button1 ----
        button1.setText("\u6309\u4f5c\u8005\u67e5\u8be2");
        button1.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {
                findbook_author(e);
            }
        });
        contentPane.add(button1, "cell 0 6");

        //---- button2 ----
        button2.setText("\u6309\u4e66\u540d\u67e5\u8be2  ");
        button2.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {
                button2MouseClicked(e);
            }
        });
        contentPane.add(button2, "cell 0 7");

        //---- button3 ----
        button3.setText("\u6309\u4f5c\u8005\u548c\u4e66\u540d\u67e5\u8be2  ");
        button3.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {
                button3MouseClicked(e);
            }
        });
        contentPane.add(button3, "cell 0 8");

        //---- button4 ----
        button4.setText("\u4e0a\u4e00\u9875");
        button4.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {
                button4MouseClicked(e);
            }
        });
        contentPane.add(button4, "cell 6 12");
        pack();
        setLocationRelativeTo(getOwner());
        // JFormDesigner - End of component initialization  //GEN-END:initComponents  @formatter:on
    }

    // JFormDesigner - Variables declaration - DO NOT MODIFY  //GEN-BEGIN:variables  @formatter:off
    private JLabel label1;
    private JButton button1;
    private JButton button2;
    private JButton button3;
    private JButton button4;
    // JFormDesigner - End of variables declaration  //GEN-END:variables  @formatter:on
}
